package top.lilele.adminSystem.utils;


/**
 * 响应枚举类，前端提示信息
 *
 * @author lilele
 */

public enum ResponseCodeEnum {
    /**
     * 2XX客户端异常
     */
    Success(200, "成功"),
    AccountWrong(201, "账号或密码错误!"),
    AccountDisable(202, "该帐号已被冻结，请联系管理员解封账号!"),
    CodeOutTime(203, "验证码到期！"),
    CodeError(204, "验证码错误!"),
    HasChildrenDept(206, "该部门下还有子部门，请先删除子部门!"),
    LoseIco(207, "菜单资源缺失图标!"),
    FileUploadOverMaxSize(209, "文件一次性上传字节过大，须采用分片上传异常!"),
    FileNotExist(210, "文件已不存在！"),
    OnLineUser(211, "在线用户"),
    PasswordError(212, "原始密码错误！"),
    PasswordNotEquals(213, "两次密码不相同！"),
    DailyHasFilled(214, "当前日报已经填写！"),
    SQLIntegrityConstraintViolationException(215, "存在重复数据！"),

    /**
     * 5XX服务端异常
     */
    Fail(500, "服务异常，请联系管理员！"),

    /**
     * 4XX校验信息有问题
     */
    NoPermission(401, "暂无权限!"),
    NoLogin(406, "未登录或当前登录信息已过期，请重新登录！"),
    BeSqueezedDown(407, "该账号已在别处登录，请修改密码或联系管理员！");

    ResponseCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    private Integer code;

    private String message;

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
